<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="Core.DAL" %>

<asp:Content ID="cHead" ContentPlaceHolderID="cphHead" runat="server">
    <% this.Page.Title = (string)ViewData["PageTitle"]; %>
</asp:Content>


<asp:Content ID="cMainContent" ContentPlaceHolderID="cphMainContent" runat="server">
<div id="administration">
<% string currentSection = string.Empty; %>
<% foreach (var item in (List<vw_Mail_MailsView>)ViewData["MailsViews"]){ %>
    <%  if(currentSection != item.Section){
           currentSection = item.Section;
    %>
    <h2><%= item.Section %></h2>
    <% } %>
        <div class="date"><%= item.InsertDate.ToString("dd/MM/yyyy HH:mm") %></div>
        <div class="chart">
            <div style="width:<%= item.Percentage.ToString() %>%;" class="percentage"></div>
            <div class="chartLabel"><strong><%= item.Title.ToString() %></strong></div>
            <div class="chartInfo"><%= item.Percentage.ToString() %>% (<%= item.CountView %> / <%= item.NumItemsSended %> )</div>
        </div>
        <div class="clr"></div>
<% } %>
</div>      
</asp:Content>


